package study08;

public class Person {
    public String eat;
    public String sleep;
    public Person(String eat, String sleep){
        this.eat = eat;
        this.sleep = sleep;
    }

    public void show(){
        System.out.println(eat);
        System.out.println(sleep);
    }
}

class Student1 extends Person{
    private String study;

    public Student1(String sleep, String eat, String study){
        super(eat, sleep);
        this.study = study;
    }

    public void show(){
       super.show();
       System.out.println(study);
    }
}


class Teacher extends Person{
    private String work;

    public Teacher(String sleep, String eat, String work){
        super(eat, sleep);
        this.work = work;
    }
    public void show(){
        super.show();
        System.out.println(work);
    }
}
